/**
 * @(#)Course.java
 *
 * Copyright: Copyright (c) 2003 Carnegie Mellon University
 *
 * This program is the implementation of the original system in the Assignment 2 of "Architectures
 * of Software Systems" class. For the details of each classes, please refer to the provided javadoc
 * documents. You will also find some useful information such as implementation decisions, coding
 * standards, and naming conventions in the README file.
 *
 * History:
 *
 * Date          Author              Change
 * ----------    ----------------    ---------------------------------------------------------------
 * 07/15/2003    Jung Soo Kim        Initial version.
 */


import java.io.Serializable;
import java.util.StringTokenizer;


/**
 * This class represents a record of a course. This class contains a course's general information
 * and the students who have registered this course. This class is constructed from a 
 * field-oriented and space-separated string. For the detailed format of such a string refer to 
 * {@link #Course(String)}. This class implements <code>Serializable</code> so that instances of
 * this class can be passed between machines through RMI
 *
 * @author Jung Soo Kim
 * @version 1.0
 */
public class User implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = -1353687934681175753L;
	protected String name ; 
    protected String password ; 

    public User(String sInput)
    {
        // Prepare to tokenize the input string.
        StringTokenizer objTokenizer = new StringTokenizer(sInput);

        // Get this course's ID, section, time, and instructor.
        this.name        = objTokenizer.nextToken();
        this.password = 	objTokenizer.nextToken();
    }

    public String getID() {
    	return name ; 
    }
    public String getPassword() {
    	return password ; 
    }
    public String toString() {
        // Create a string to return with course ID, name, and program, course ID, section, class
        // days, start time, stop time, and the instructor.
        return this.name+ " " + this.password ;
    }
}
